<template>
  <div>
    <el-checkbox-group
      v-model="model.inheritanceList"
      @change="handlerCheckBox"
    >
      <el-checkbox label="2">无</el-checkbox>
      <el-checkbox label="1">有</el-checkbox>
      <el-input v-model="model.inheritanceValue" style="width:120px" />
    </el-checkbox-group>
  </div>
</template>

<script>
export default {
  props: {
    model: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {}
  },
  methods: {
    handlerCheckBox(value) {
      if (this.model.inheritanceList.length > 1) {
        this.model.inheritanceList.splice(0, 1)
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.el-input {
  margin-left: 15px;
}
</style>
